class GoodsFsEntity {
  GoodsFsData data;
  int code;
  String msg;

  GoodsFsEntity({this.data, this.code, this.msg});

  GoodsFsEntity.fromJson(Map<String, dynamic> json) {
    data = json['data'] != null ? new GoodsFsData.fromJson(json['data']['list']) : null;
    code = json['code'];
    msg = json['msg'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data']['data'] = this.data.toJson();
    }
    data['code'] = this.code;
    data['msg'] = this.msg;
    return data;
  }
}

class GoodsFsData {
  List<GoodsFsDataData> datas;

  GoodsFsData();

  GoodsFsData.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      datas = new List<GoodsFsDataData>();
      (json['data'] as List).forEach((v) {
        datas.add(new GoodsFsDataData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.datas != null) {
      data['data'] = this.datas.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class GoodsFsDataData {
  String goods_id;
  String id;
  String all_num;
  String goods_name;
  String sales_num;
  String img;
  String tmp_img;
  String limit_num;
  String start_time;
  String end_time;
  String price;
  GoodsFsDataDatasTag goodsMsg;
  GoodsFsDataData({
    this.goods_id,
    this.goodsMsg,
    this.id,
    this.all_num,
    this.goods_name,
    this.sales_num,
    this.price,
    this.img,
    this.tmp_img,
    this.limit_num,
    this.start_time,
    this.end_time,
  });

  GoodsFsDataData.fromJson(Map<String, dynamic> json) {
    goods_id = json['goods_id'].toString();
    sales_num = json['sales_num'].toString();
    goods_name = json['goods_name'].toString();
    img = json['img'];
    id=json['id'].toString();
    price=json['price'].toString();
    all_num =( json['all_num']==null?"0":json['all_num'].toString());
    start_time = json['start_time'];
    end_time = json['end_time'];
    limit_num = json['limit_num'].toString();

    goodsMsg = GoodsFsDataDatasTag.fromJson(json['goodsMsg']);
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['goods_id'] = this.goods_id;
    data['sales_num'] = this.sales_num;
    data['img'] = this.img.replaceAll("\\", "");
    data['goods_name'] = this.goods_name;
    data['tmp_img'] = this.tmp_img;
    return data;
  }
}

class GoodsFsDataDatasTag {
  String name;
  String url;

  GoodsFsDataDatasTag({this.name, this.url});

  GoodsFsDataDatasTag.fromJson(Map<String, dynamic> json) {
    name = json['goods_name'];
    url = json['img'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['goods_name'] = this.name;
    data['img'] = this.url.replaceAll("\\", "");
    return data;
  }
}
